package design_pattern.factory.test3;

/**
 * Created by WeiDingKuo on 2017/10/26 10:14
 */
public class Test {
    public static void main(String[] args) {
        Factory factory = new FactoryImpl1();
        Product product1 = factory.getProduct(ProductImpl1.class);
        Product product2 = factory.getProduct(ProductImpl2.class);

        product1.dosomething1();
        product1.dosomething2();
        System.out.println("==========");
        product2.dosomething1();
        product2.dosomething2();
    }
}
